package com.meizi.daily.biz;

import com.meizi.daily.entity.Consumption;
import com.meizi.daily.mapper.ConsumptionMapper;
import com.meizi.daily.query.ConsumptionQuery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author meizi
 * @email enjoymeizi@gmail.com
 * @date 2020-05-20 18:15:43
 */
@Service
public class ConsumptionBiz {
    @Autowired
    private ConsumptionMapper mapper;

    public List<Consumption> selectByQuery(ConsumptionQuery consumptionQuery) {
        return mapper.selectByQuery(consumptionQuery);
    }

    public void addConsumption(Consumption consumption){
        mapper.insert(consumption);
    }
}
